package tpf.designer.pattern.course8.behavior_pattern3.homework;

import org.apache.log4j.Logger;
import org.junit.Test;

public class Client {
    public static final Logger LOGGER = Logger.getLogger(Client.class);

    @Test
    public void test(){
        //构建
        Node a = new ValueNode(true);
        Node b = new ValueNode(false);
        Node c = new ValueNode(true);
        Node d = new NotNode(false);
        Node node = new OrNode(new AndNode(a,b),new AndNode(c,d));

        boolean result = node.interpret();
        System.out.println("(true && false)||(true && !false) = "+result);

    }
}
